-- GENERATED SPELL FOR [Elder Black Bear] --


function spell0_1186(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16828,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1186', 685, 1)
end

function spell1_1186(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1186', 0, 1)
end

function spell2_1186(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1186', 0, 1)
end

function spell3_1186(pUnit, Event) --@Swipe,n/a--
pUnit:FullCastSpellOnTarget(50256,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1186', 0, 1)
end

function Sorts_1186(pUnit, Event)
local choix_sorts_1186 = math.random(0, 3)
if choix_sorts_1186 == 0 then
pUnit:RegisterEvent('spell0_1186', 1, 1)
end
if choix_sorts_1186 == 1 then
pUnit:RegisterEvent('spell1_1186', 1, 1)
end
if choix_sorts_1186 == 2 then
pUnit:RegisterEvent('spell2_1186', 1, 1)
end
if choix_sorts_1186 == 3 then
pUnit:RegisterEvent('spell3_1186', 1, 1)
end
end

function mob1186_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1186', math.random(1500, 3000), 1)
end

function mob1186_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1186_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1186_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1186, 1, 'mob1186_Action')
RegisterUnitEvent(1186, 2, 'mob1186_Leave')
RegisterUnitEvent(1186, 3, 'mob1186_Kill')
RegisterUnitEvent(1186, 4, 'mob1186_Die')
